package huachenxing.mimi520.option
{
	import com.cambright.lotusroot.CommandMap;
	import com.cambright.lotusroot.Module;
	
	import huachenxing.mimi520.option.commands.CloseAccountWindowCommand;
	import huachenxing.mimi520.option.commands.CloseQueryWindowCommand;
	import huachenxing.mimi520.option.commands.CloseWorkerWindowCommand;
	import huachenxing.mimi520.option.commands.OpenAccountWindowCommand;
	import huachenxing.mimi520.option.commands.OpenQueryWindowCommand;
	import huachenxing.mimi520.option.commands.OpenWorkerWindowCommand;
	import huachenxing.mimi520.option.handlers.CloseAccountWindowHandler;
	import huachenxing.mimi520.option.handlers.CloseQueryWindowHandler;
	import huachenxing.mimi520.option.handlers.CloseWorkerWindowHandler;
	import huachenxing.mimi520.option.handlers.OpenAccountWindowHandler;
	import huachenxing.mimi520.option.handlers.OpenQueryWindowHandler;
	import huachenxing.mimi520.option.handlers.OpenWorkerWindowHandler;
	import huachenxing.mimi520.option.widgets.AccountWindowWidget;
	import huachenxing.mimi520.option.widgets.QueryWindowWidget;
	import huachenxing.mimi520.option.widgets.WorkerWindowWidget;
	
	public class Module extends com.cambright.lotusroot.Module
	{
		public var accountWindow:AccountWindowWidget;
		public var workerWindow:WorkerWindowWidget;
		public var queryWindow:QueryWindowWidget;
		
		override public function get commandMap():CommandMap
		{
			var map:CommandMap = new CommandMap();
			map.add(OpenWorkerWindowCommand, OpenWorkerWindowHandler);
			map.add(CloseWorkerWindowCommand, CloseWorkerWindowHandler);
			map.add(OpenAccountWindowCommand, OpenAccountWindowHandler);
			map.add(CloseAccountWindowCommand, CloseAccountWindowHandler);
			map.add(OpenQueryWindowCommand, OpenQueryWindowHandler);
			map.add(CloseQueryWindowCommand, CloseQueryWindowHandler);
			return map;
		}
		
		override protected function initialize():void
		{
			accountWindow = pushWidget(AccountWindowWidget);
			workerWindow = pushWidget(WorkerWindowWidget);
			queryWindow = pushWidget(QueryWindowWidget);
		}
	}
}



